from sqlalchemy import Column, Integer, String, Text, SmallInteger
from .base import BaseModel


class BrandDo(BaseModel):
    __tablename__ = "brand"
    __table_args__ = {"comment": "品牌表"}

    id = Column(Integer, primary_key=True, autoincrement=True, comment="主键")
    name = Column(String(64), nullable=False, comment="品牌名称")
    first_letter = Column(String(8), comment="首字母")
    sort = Column(Integer, default=0, comment="排序")
    factory_status = Column(SmallInteger, default=1, comment="是否为厂家制造商 1-是 0-否")
    show_status = Column(SmallInteger, default=1, comment="展示状态 1-展示 0-不展示")
    product_count = Column(Integer, default=0, comment="产品数量")
    product_comment_count = Column(Integer, default=0, comment="评论数量")
    logo = Column(String(255), comment="品牌 logo")
    big_pic = Column(String(255), comment="品牌大图")
    brand_story = Column(Text, nullable=True, comment="品牌故事")
